<template>
    <a-card>
      <a-modal
        title="退款处理"
        :width="800"
        :visible="modalMisible"
        :plain="true"
        @ok="submitOk"
        @cancel="modalMisible=false"
      >
        <a-form>
          <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="协商退款原因" :required="true" hasFeedback>
              <a-textarea :rows="5" v-model="reason" placeholder="协商退款原因" ></a-textarea>
          </a-form-item>
        </a-form>
      </a-modal>
  
    </a-card>
  </template>
  
  <script>
    import { httpAction,postAction, getAction,putAction } from '@api/manage'
    import JDate from '@/components/jeecg/JDate'
    export default {
      name: 'RegisterRefoundAudit',
      components: {
        JDate,
      },
      inject: ['reload'],
  
      data() {
        return {
          successCont:true,
          failCont:false,
          title: '挂号管理',
          modalMisible: false,
          labelCol: {
            xs: { span: 24 },
            sm: { span: 5 },
          },
          wrapperCol: {
            xs: { span: 24 },
            sm: { span: 16 },
          },
          labelCols: {
            xs: { span: 12 },
            sm: { span: 8 },
          },
          wrapperCols: {
            xs: { span: 12 },
            sm: { span: 10 },
          },
          reason:"", //挂号失败原因
          record:{},
          url: {
            audit:"/doctorRegister/doctorRegister/updateRegisterRefond"
          }
        }
      },
      created() {},
      methods: {
        viewShow(record) {
          this.record = record;
          this.modalMisible = true
          var param = {
            recordId : record.id
          }
        },
        submitOk () {
          getAction(this.url.audit,{id:this.record.id,invalid:1,xsResion:this.reason,doctorId:this.record.doctorId}).then((res)=>{
            if(res.code === 200){
              this.$message.success(res.message);
              this.modalMisible = false
              this.reload()
            }else{
              this.$message.warning(res.message)
            }
          }).catch((error)=>{
            console.log(error);
          })

        }
      }
    }
  </script>
  
  <style lang="less" scoped>
    .ant-input-number {
      margin-right: 20px;
      width: 360px;
    }
    #phone{
      border: 1px solid gainsboro;
      height: 35px;
      border-radius: 5px;
      padding: 0 10px;
      outline: #c6c6ea;
    }
  </style>